/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */



package sonia.golf;

//~--- JDK imports ------------------------------------------------------------

import java.util.Date;

/**
 *
 * @author Sebastian Sdorra
 */
public class Player
{

  /**
   * Constructs ...
   *
   */
  public Player() {}

  /**
   * Constructs ...
   *
   *
   * @param name
   */
  public Player(String name)
  {
    this.name = name;
    this.creationDate = new Date();
  }

  /**
   * Constructs ...
   *
   *
   * @param name
   * @param creationDate
   */
  public Player(String name, Date creationDate)
  {
    this.name = name;
    this.creationDate = creationDate;
  }

  //~--- methods --------------------------------------------------------------

  /**
   * Method description
   *
   *
   * @return
   */
  @Override
  public String toString()
  {
    return name;
  }

  //~--- get methods ----------------------------------------------------------

  /**
   * Method description
   *
   *
   * @return
   */
  public Date getCreationDate()
  {
    return creationDate;
  }

  /**
   * Method description
   *
   *
   * @return
   */
  public String getName()
  {
    return name;
  }
  
  //~--- fields ---------------------------------------------------------------

  /** Field description */
  private Date creationDate;

  /** Field description */
  private String name;
}
